package cn.bass.marketing.service.strategyPrize;

import cn.bass.marketing.common.vo.resp.MarketingStrategyPrizeRespVO;
import cn.bass.marketing.entity.MarketingStrategyPrizeDO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface MarketingStrategyPrizeService extends IService<MarketingStrategyPrizeDO> {

    /**
     * 查询策略下的可用奖品列表
     * @param strategyId 策略ID
     * @return 策略奖品列表
     */
    List<MarketingStrategyPrizeRespVO> selectEnableStrategyPrizeList(String strategyId);

    /**
     * 保存策略奖品范围缓存
     * @param strategyId 策略ID
     * @param rateRange 奖品范围
     * @param strategyPrizeRangeMap 奖品范围缓存
     */
    void saveCacheStrategyPrizeRangeMap(String strategyId, Integer rateRange, Map<Integer, Integer> strategyPrizeRangeMap);


    /**
     * 获取策略奖品范围缓存
     * @param strategyId 策略ID
     * @return 奖品范围缓存
     */
    Integer getCacheRateRange(String strategyId);

    /**
     * 获取策略奖品范围缓存
     * @param strategyId 策略ID
     * @param rateRange 奖品范围
     * @return 奖品范围缓存
     */
    Integer getCacheStrategyPrizeRangeMap(String strategyId, Integer rateRange);
}
